package com.example.demo.excel;

import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.example.demo.entity.ExcelEntity;

import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.List;

/**
 * @author 高俊
 * @create 2021-08-2021/8/26-22:31
 */
public class ExcelUtils {

    public static void exportExcel(HttpServletResponse response,Class clazz, List<?> list, ExcelEntity excelEntity) throws Exception{
        ServletOutputStream stream = response.getOutputStream();

        WriteSheet sheet = EasyExcel.writerSheet().build();
        sheet.setSheetName(excelEntity.getSheetName());



    }

}
